home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2007 June/July / Windows News Hors série Numéro 34 juin juillet 2007.iso / Rédaction / Astuces Windows XP / Utilisateur.vbs < prev    next >
Encoding:
Text File  |  2007-01-30  |  346 b   |  9 lines

  1. strComputer = "NomOrdi"
  2. Set objWMIService = GetObject("winmgmts:" _
  3.     & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") 
  4. Set colComputer = objWMIService.ExecQuery _
  5.     ("Select * from Win32_ComputerSystem")
  6. For Each objComputer in colComputer
  7.     Wscript.Echo "Utilisateur connectΘ : " & objComputer.UserName
  8. Next
  9.